import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import "./Celiangxingxiang.css";
import "./Celianghuashu.css";
import axios from "axios";
export default function Paihangbang() {
  let [list, setlist] = useState([]);
  let getlist = () => {
    axios.get("http://localhost:3000/yzk/list").then((res) => {
      setlist(res.data.data);
    });
  };
  useEffect(() => {
    getlist();
  }, []);
  let navigate = useNavigate();
  return (
    <div>
      <div className="yzkphbTop">
        <div
          onClick={() => {
            navigate("/yzk/wo");
          }}
        >
          返回
        </div>
        <div>我的余额</div>
        <div> </div>
      </div>
      <hr></hr>
      <div>
        <div>
          <p className="yzkceliangbox2p">我的余额</p>
          <span style={{ float: "right" }}>常见问题</span>
          <br></br>
          <h1>0.00</h1>
        </div>
        <hr></hr>
        <p>收益明细</p>
        <div>
          {list.map((item) => {
            return (
              <div className="yzkceliangbox2">
                <p>
                  完成测量<span style={{ float: "right" }}>+100</span>
                </p>
                <br></br>
                <span>2024-11-11 10:11:11</span>
              </div>
            );
          })}
        </div>
      </div>
    </div>
  );
}
